package cn.dt70.service.impl;

import cn.dt70.dao.aqbEntitycommodity.AqbEntitycommodityMapper;
import cn.dt70.service.AqbEntitycommodityService;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class AqbEntitycommodityServiceImpl implements AqbEntitycommodityService {


    private static final Logger LOGGER = Logger.getLogger(AqbEntitycommodityServiceImpl.class);

    @Resource
    private AqbEntitycommodityMapper aqbEntitycommodityMapper;

    @Override
    public Boolean updatecount(int commodityId, int count) {
        int flag =0 ;
        try {
           flag = aqbEntitycommodityMapper.updateCount(commodityId,count);
        }catch (Exception e) {
            //e.printStackTrace();
            LOGGER.error("addOrderById(AqbOrder aqbOrder)>>>"+e.getMessage());
        }
      if(flag>0){
          return true;
      }else {
          return false;
      }


    }
}
